<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <%- include ../taglibs/layout_head.ejs%>
    <%- include ../taglibs/layout.css.ejs%>
</head>
<body>
<%-include("../taglibs/header.ejs",{params:{className:"active",reportIsActive:"true"}})%>
<div class="nav-body" id="divContent">
    <div class="nav-box">
        <div class="row">
            <div class="col-sm-4 col-md-3 col-lg-2 nav-box-left-box">
                <%-include("reportManageLeftMenu.ejs",{params:{className:"active",hotreport:"true"}})%>
            </div>
            <div class="col-sm-6 col-md-9 col-lg-10 right-container-box">
                <ol class="head-breadcrumb">
                    <li>
                        <a>数据报表</a>
                    </li>
                    <li class="active">
                        点火报警
                    </li>
                </ol>
                <div class="right-container"  style="margin-top: 25px">
                    <section class="content content-search">
                        <div class="row">
                            <div class="col-sm-12">
                                <div class="col-sm-12 col-md-10">
                                    <div class="col-sm-12 col-md-12 content-search-left">
                                        <div class="col-sm-12 col-md-6 col-lg-4 content-search-left-box">
                                            <label class="col-sm-4">
                                                开始时间：
                                            </label>
                                            <div class="col-sm-8">
                                                <input type="text" class="form-control layer-date" id="start" name="start" >
                                            </div>
                                        </div>
                                        <div class="col-sm-12 col-md-6 col-lg-4 content-search-left-box">
                                            <label class="col-sm-4">
                                                结束时间：
                                            </label>
                                            <div class="col-sm-8">
                                                <input type="text" class="form-control layer-date" id="end" name="end">
                                            </div>
                                        </div>
                                        <div class="col-sm-12 col-md-6 col-lg-4 content-search-left-box">
                                            <label class="col-sm-4">
                                                选择设备：
                                            </label>
                                            <div class="col-sm-8">
                                                <input type="email" class="form-control" id="exampleInputEmail2">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-sm-12 col-md-2 " style="text-align: center">
                                    <button type="button" class="btn btn-round btn-theme" style="margin-bottom: 3px;margin-top: 3px">查 询</button>
                                    <button type="button" class="btn btn-round btn-danger" style="margin-bottom: 3px;margin-top: 3px">重 置</button>
                                </div>
                            </div>
                        </div>
                    </section>
                    <section class="content content-table">
                        <!--<section class="content-table-tools">
                            <div class="tools-box">
                                <button type="button" class="btn btn-round btn-add">新 增</button>
                                <button type="button" class="btn btn-round btn-danger">删 除</button>
                            </div>
                        </section>-->
                        <div style="display: block">
                            <table id="lichengbaobiao"></table>
                        </div>
                    </section>
                </div>
            </div>
        </div>
    </div>
</div>
<%-include ../taglibs/layout.js.ejs%>
<!--时间-->
<script src="js/plugins/layer/laydate/laydate.js"></script>
<script type="text/javascript" src="js/report/reportIndex.js"></script>
<script type="text/javascript" src="js/viewpage/dataManage/userInfo/userInfo.js"></script>
<script type="text/javascript">
    $(function () {
        UserInfo.initUserPage();
        var dataTable = new BootstrapTable($('#lichengbaobiao'),{
            //url: '/dataManage/queryUserList',
            data:[],
            sidePagination: "client",
            columns: [{
                field: 'name',
                title: '编号'
            }, {
                field: 'parentName',
                title: '车牌号码'
            }, {
                field: 'level',
                title: '点火时长'
            },
//                {
//                    field: 'level',
//                    title: '油耗'
//                },
                {
                field: 'level',
                title: '里程'
            }, {
                field: 'level',
                title: '最大速度'
            },{
                field: 'level',
                title: '操作'
            }
            ]
        });
        dataTable.init();
        var start = {
            elem: '#start',
            format: 'YYYY-MM-DD hh:mm:ss',
//            min: laydate.now(), //设定最小日期为当前日期
            max: '2999-06-16 23:59:59', //最大日期
//            start: laydate.now(),
//            start: laydate.now() + ' 00:00:00',
            istime: true,
            istoday: false,
            festival: true, //是否显示节日
            choose: function (datas) {
                if(datas){
                    end.min =datas.substring(0,10)+" 00:00:00"
                    end.start = datas.substring(0,10)+" 00:00:00"
                }
//                end.min = datas; //开始日选好后，重置结束日的最小日期
//                end.start = datas //将结束日的初始值设定为开始日
            }
//            min: laydate.now(-1), //-1代表昨天，-2代表前天，以此类推
//            max: laydate.now(+1) //+1代表明天，+2代表后天，以此类推
        };
        var end = {
            elem: '#end',
            format: 'YYYY-MM-DD hh:mm:ss',
//            min: laydate.now(),
            max: '2999-06-16 23:59:59',
//            start: laydate.now() + ' 23:59:59',
            istime: true,
            istoday: false,
            festival: true, //是否显示节日
            choose: function (datas) {
                var st=$("#start").val();
                if(st>datas){
                    swal({
                        title: "系统提示",
                        text: "开始时间必须小于结束时间!",
                        type: "error"
                    });
//                    $("#end").val(laydate.now() + ' 23:59:59');
                }else{
                    start.max = datas.substring(0,10)+" 23:59:59"; //结束日选好后，重置开始日的最大日期
                }
            }
        };
        laydate(start);
        laydate(end);
        $("#start").val(laydate.now() + ' 00:00:00');
        $("#end").val(laydate.now() + ' 23:59:59');
    })
</script>
</body>
</html>